package com.example.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * null
 * @TableName course_detailed
 */
@TableName(value ="course_detailed")
@Data
public class CourseDetailed implements Serializable {
    /**
     * 课程详细表
     */
    @TableId
    private Integer courseDetailedId;

    /**
     * 任课教师id
     */
    private Integer teacherId;

    /**
     * 班级id
     */
    private Integer clzzId;

    /**
     * 课程介绍
     */
    private String introduce;

    /**
     * 课程图片
     */
    private String picture;

    /**
     * 课程开始时间
     */
    private Date starttime;

    /**
     * 课程结束时间
     */
    private Date endtime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CourseDetailed other = (CourseDetailed) that;
        return (this.getCourseDetailedId() == null ? other.getCourseDetailedId() == null : this.getCourseDetailedId().equals(other.getCourseDetailedId()))
            && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
            && (this.getClzzId() == null ? other.getClzzId() == null : this.getClzzId().equals(other.getClzzId()))
            && (this.getIntroduce() == null ? other.getIntroduce() == null : this.getIntroduce().equals(other.getIntroduce()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()))
            && (this.getStarttime() == null ? other.getStarttime() == null : this.getStarttime().equals(other.getStarttime()))
            && (this.getEndtime() == null ? other.getEndtime() == null : this.getEndtime().equals(other.getEndtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCourseDetailedId() == null) ? 0 : getCourseDetailedId().hashCode());
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getClzzId() == null) ? 0 : getClzzId().hashCode());
        result = prime * result + ((getIntroduce() == null) ? 0 : getIntroduce().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        result = prime * result + ((getStarttime() == null) ? 0 : getStarttime().hashCode());
        result = prime * result + ((getEndtime() == null) ? 0 : getEndtime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", courseDetailedId=").append(courseDetailedId);
        sb.append(", teacherId=").append(teacherId);
        sb.append(", clzzId=").append(clzzId);
        sb.append(", introduce=").append(introduce);
        sb.append(", picture=").append(picture);
        sb.append(", starttime=").append(starttime);
        sb.append(", endtime=").append(endtime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}